<template>
  <CubicleReservationRecord v-if="isCubicle" :data="data" />
  <InstrumentReservationRecord v-else-if="isInstrument" :data="data" />
</template>

<script setup lang="ts">
import { computed } from 'vue';
import CubicleReservationRecord from "@/apps/client/components/CubicleReservationRecord.vue";
import InstrumentReservationRecord from "@/apps/client/components/InstrumentReservationRecord.vue";

const props = defineProps<{ data: any }>();

const isCubicle = computed(() =>
    ['CUBICLE_LAB', 'CUBICLE_MEETING'].includes(props.data.type)
);
const isInstrument = computed(() =>
    props.data.type === 'INSTRUMENT'
);
</script>
